// !@#$McCaBe-InStRuMeNtAtIoN$#@!
// Instrumented with the McCabe Java Parser
// Version: 8.1.0.1 - 20110309
// Using Path Vector Instrumentation
// Date: Sun Apr 01 2012 20:38:23
package Driver;

import EventManager.ClientPerson;
import Model.Person;
import Service.OutputManager;

import com.mccabe.*;


class MultithreadingTestOperationStrategy_20c688300073bd3429320f6265c0cfc1 {
    static java.lang.Object info[];
    static {
        info = new java.lang.Object[2];
        info[0] = new Integer(-1);
        info[1] = new String("R:\\yu\\Concordia\\SOEN 344 Design II\\Term Assignment\\Code Repo\\trunk\\Iteration 3\\ERS\\src\\Driver\\MultithreadingTestOperationStrategy.java");
    }
}


/**
 * This class tests the synchronization capabilites of the system by making several clients make concurrent requests.
 * 
 * @author Yury Kitaev
 *
 */
public class MultithreadingTestOperationStrategy implements OperationStrategy 
{
	@Override
	public void run() 
	{
int _mcFreq_4df91ca40069efa9e07bd0e04e661164[] = new int[4];
PathVec_ERS_Iter3.enterMethod(MultithreadingTestOperationStrategy_20c688300073bd3429320f6265c0cfc1.info,0,_mcFreq_4df91ca40069efa9e07bd0e04e661164,0);

		
		OutputManager.println("\nMULTITHREADING TEST MODE ENGAGED, GET READY!!!!!!!\n");
		
		// Create a person and a bot for him
		Person hank = new ClientPerson("Hank", "Rearden");
		AsyncBot hankBot = new AsyncBot(hank);
		
		Person dagny = new ClientPerson("Dagny", "Taggart");
		AsyncBot dagnyBot = new AsyncBot(dagny);
		
		Person lilian = new ClientPerson("Lilian", "Rearden");
		AsyncBot lilianBot = new AsyncBot(lilian);
		
		Person mouch = new ClientPerson("Wesley", "Mouch");
		AsyncBot mouchBot = new AsyncBot(mouch);
		
		hankBot.start();
		lilianBot.start();
		dagnyBot.start();
		mouchBot.start();
		
		
		
{boolean __MCCABE_SKIPNEXT_EVENT_5 = false;
try {try
		{
			hankBot.join();
			mouchBot.join();
			dagnyBot.join();
			lilianBot.join();
			
			OutputManager.println("\nMULTITHREADING TEST MODE SUCCESSFULLY COMPLETED\n(scroll up)\n");
		} 
		catch (InterruptedException e) 
		{
PathVec_ERS_Iter3.decision(MultithreadingTestOperationStrategy_20c688300073bd3429320f6265c0cfc1.info,0,_mcFreq_4df91ca40069efa9e07bd0e04e661164,1,0,true);
__MCCABE_SKIPNEXT_EVENT_5 = true;

			return;
		}
if (!__MCCABE_SKIPNEXT_EVENT_5)

PathVec_ERS_Iter3.decision(MultithreadingTestOperationStrategy_20c688300073bd3429320f6265c0cfc1.info,0,_mcFreq_4df91ca40069efa9e07bd0e04e661164,3,0,true);
__MCCABE_SKIPNEXT_EVENT_5 = true;

} finally {
    if (!__MCCABE_SKIPNEXT_EVENT_5)
        PathVec_ERS_Iter3.decision(MultithreadingTestOperationStrategy_20c688300073bd3429320f6265c0cfc1.info,0,_mcFreq_4df91ca40069efa9e07bd0e04e661164,2,0,true);
}}

		
	}

}
